<template>
	<view>
		<view class="dialog-view" v-if="showPlus">
			<view class="dialog-header">
				<text>发起流程</text>
				<image src="/static/icon-close.png" mode="" @click="$store.state.vuex_stata = false"></image>
			</view>
			<view class="text-title">请选择要发起的流程类型</view>
			<view class="dialog-content">
				<view class="box" @click="navTo('/pages/sys/home/inspection')">
					<view class="box-image">
						<image src="/static/icon-device-1.png" mode=""></image>
					</view>
					<text class="bot-text">设备巡检</text>
				</view>
				<view class="box" @click="navTo('/pages/sys/home/repair')">
					<view class="box-image">
						<image src="/static/icon-device-2.png" mode=""></image>
					</view>
					<text class="bot-text">设备报修</text>
				</view>
			</view>
		</view>
		<view class="mask" v-if="showPlus"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: true
			};
		},
		computed: {
		  showPlus: {
		    get() {
					this.show = this.$store.state.vuex_stata
		      return this.show;
		    },
		    set(val) {
					this.$store.state.vuex_stata = val
		    },
		  },
		},
		methods: {
			navTo(href) {
				uni.navigateTo({
					url: href
				});
			}
		}
	}
</script>

<style lang="scss">
.dialog-view {
	width: 688rpx;
	height: 808rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10000;
	padding: 48rpx 40rpx;
	.dialog-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text {
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #333333;
			line-height: 48rpx;
			text-align: left;
			font-style: normal;
		}
		image {
			width: 44rpx;
			height: 44rpx;
		}
	}
	.text-title {
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #999999;
		line-height: 34rpx;
		text-align: left;
		font-style: normal;
		margin: 16rpx 0 48rpx 0;
	}
	.dialog-content {
		display: flex;
		.box {
			margin-right: 46rpx;
			.box-image {
				width: 172rpx;
				height: 172rpx;
				background: linear-gradient( 141deg, #F9FBFF 0%, #E2E7F2 100%);
				box-shadow: 0px 8rpx 16rpx 0px rgba(173,201,255,0.2);
				border-radius: 16rpx;
				image {
					width: 136rpx;
					height: 136rpx;
				}
			}
		}
		.bot-text {
			display: inline-block;
			width: 100%;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #666666;
			line-height: 40rpx;
			text-align: left;
			font-style: normal;
			text-align: center;
			margin-top: 16rpx;
		}
	}
}
.mask {
	width: 100%;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	background: #000;
	opacity: .5;
	z-index: 9999;
}
</style>
